export const shareMixins = {
    data () {
        return {
            shareData: {
                title: '',
                path: '', // 分享的页面路径
                imageUrl: '',
                content: '',
                desc: ''
            }
        }
    },

    //#ifdef MP-WEIXIN
	// uniapp微信小程序分享页面到微信好友
    onShareAppMessage (res) {
		// if (res.from === 'button') { // 来自页面内分享按钮
		// 	console.log(res.target)
		// }
        return {
            title: this.shareData.title,
            path: this.shareData.path,
            imageUrl: this.shareData.imageUrl,
            content: this.shareData.content,
            desc: this.shareData.desc,
            success: res => {
                console.info(res)
            }
        }
    },
	
	/*
	 * uniapp微信小程序分享页面到微信朋友圈
	 */
	onShareTimeline() {},
    //#endif

    onLoad(option) {
    }
}